1. Field of the Invention
The present invention relates to the field of computer image processing technology, and more particularly to an image background modeling and foreground extraction method based on a depth image.
2. Description of Related Art
At present, image sources in background modeling and foreground extraction are mainly color images. Background modeling and foreground extraction methods for color images are mainly Gaussian background modeling, codebook background modeling, and the like. The existing methods of modeling a color image mainly have the following problems: firstly, background information is distinguished from foreground information simply according to color changes and positional relationships between targets in the image cannot be embodied; secondly, the color image is greatly influenced by light and external environment, which greatly influences the results of the foreground extraction, resulting in poor stability; and thirdly, a data volume of a single pixel point in the color image is large, so that the operation efficiency in the modeling process is low.
The paper “Real-Time Foreground-Background Segmentation Using Codebook Model” (Kyungnam Kim, Thanarat H. Chalidabhongse, David Harwood, Larry Davis, 2005, Elsevier) provides a solution, which has advantages that a background model can be built in a color video stream and a foreground target can be surely extracted by an algorithm in real time, but still has obvious disadvantages. For example, extraction of foreground objects in a color image is easily influenced by light and texture. For example, in a dark room, the background modeling and foreground extraction based on a color image have a poor effect. Also, with the background modeling method in the paper, a process of initially modeling a scene is required before an accurate foreground extraction can be performed, thereby influencing user experience in actual practice.
“Three-Dimensional Scene Analysis” is disclosed in Chinese patent application No. 201110132428.8, where two depth images are used in a background model. Through the method, target extraction based on a depth image can be effectively performed, but the following obvious disadvantages still exist: firstly, through the method, a more complex background model, for example, a regularly moving background (for example, a rotating electric fan, also present as a background model) cannot be processed; and secondly, the background model is not updated in real time, where the method is based on a hypothesis of a static background and cannot process more complex background changes.
“Foreground and Feature Extraction Method Based on Outline Difference and Block Dominant Orientation Histogram” is disclosed in Chinese patent application No. 201310301859.1, where in the method, a moving object is located according to an outline difference between an original video and a background image obtained by background modeling to retain the outline of the moving object, and a gradient histogram feature based on a block dominant orientation is extracted by using gradient information without a background in combination with a block dominant gradient orientation, to overcome the disadvantage of over-dependence on local detail features. Through the method, target extraction in a complex background can be effectively performed so that the accuracy rate of foreground extraction and feature classification is up to 94.04%, but the following obvious disadvantages still exist: firstly, the present patent is based on a built background model, and the situation that a background model is not initially provided cannot be processed; and secondly, the calculation amount is large, where a gradient feature needs to be calculated and identification using a classifier is required.
Accordingly, how to overcome the disadvantages of the existing techniques has become one of important problems to be solved currently in the field of computer image processing technology.